package com.maxh.service.impl;

import com.maxh.mapper.TeacherMapper;
import com.maxh.pojo.Teacher;
import com.maxh.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("TeacherService")
public class TeacherServiceImpl implements TeacherService {
    @Autowired(required =  false)
    TeacherMapper teacherMapper;


    @Override
    public List<Map<String, Object>> getTeacherList() {
        return teacherMapper.getTeacherList();
    }

    @Override
    public List<Map<String, Object>> searchTeacherList(Map<String, Object> map) {
        return  teacherMapper.searchTeacherList(map);
    }

    @Override
    public Teacher searchTeacherById(Map<String, Object> map) {
        return teacherMapper.searchTeacherById(map);
    }

    @Override
    public boolean deleteTeacher(String id) {
        return teacherMapper.deleteTeacher(id);
    }

    @Override
    public boolean addTeacher(Map<String, Object> mapTeacher) {
        return teacherMapper.addTeacher(mapTeacher);
    }

    @Override
    public boolean updateTeacher(Map<String, Object> map) {
        return teacherMapper.updateTeacher(map);
    }

    @Override
    public Boolean updatePassword(String id,String password) {
        return teacherMapper.updatePassword(id,password);
    }

    @Override
    public List<Map<String, Object>> userGetTeacher() {
        return teacherMapper.findTeacherList();
    }
}
